///*
// * To change this template, choose Tools | Templates
// * and open the template in the editor.
// */
//package nl.maxato.services;
//
//
//import java.io.BufferedReader;
//import java.io.InputStreamReader;
//import java.net.MalformedURLException;
//import java.net.URL;
//import java.util.logging.Level;
//import java.util.logging.Logger;
//
//import com.thoughtworks.xstream.XStream;
//import com.thoughtworks.xstream.io.xml.DomDriver;
//import com.thoughtworks.xstream.mapper.CannotResolveClassException;
//import com.thoughtworks.xstream.mapper.MapperWrapper;
//
//import nl.maxato.domain.Version;
//
///**
// *
// * @author Danny
// */
//public class XMLService {
//
//    XStream xstream;
//    
//    public void initxStream() {
//         xstream = new XStream(new DomDriver()) {
//
//            @Override
//            protected MapperWrapper wrapMapper(MapperWrapper next) {
//                return new MapperWrapper(next) {
//
//                    @Override
//                    public boolean shouldSerializeMember(Class definedIn, String fieldName) {
//                        try {
//                            return definedIn != Object.class || realClass(fieldName) != null;
//                        } catch (CannotResolveClassException cnrce) {
//                            return false;
//                        }
//                    }
//                };
//            }
//        };
//    }
//    
////    public boolean newVersionAvailable() {
////      initxStream();
////        URL url;
////        try {
////            url = new URL("http://maxatotool.atwebpages.com/version/version.xml");
////
////            BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
////
////            System.out.println(in.toString());
////            //System.out.println(x.fromXML(in).toString());
////
////            Version v = (Version) xstream.fromXML(in);
////            System.out.println("versie" + v.getVersion() + " URL: " + v.getUrl());
////
////            if (ConfigurationFile.getVersion() < v.getVersion()) {
////                return true;
////            } else {
////                return false;
////            }
////            
////        } catch (Exception ex) {
////            Logger.getLogger(XMLService.class.getName()).log(Level.SEVERE, null, ex);
////        }
////     return false;   
////    }
//}
